package com.tadpole.music.adapter.base;


import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * 创建人：zhouliqiang
 * 日  期：2019/3/28  4:24 PM
 * 类说明：MyPagerAdapter
 */
public class HomePagerAdapter extends FragmentPagerAdapter {
    private ArrayList<Fragment> fragments;

    public HomePagerAdapter(FragmentManager fm, ArrayList<Fragment> fragments) {
        super(fm);
        this.fragments = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }

}
